import { postAxios, getAxios, postDownloadAxios } from '@/lib/http';

export const ordersApi = {
    handAction:(data)=>{
        return postAxios('/orders/handle', data);
    },
    // 添加 @author wuqian
    addOrders: (data) => {
        return postAxios('/orders/add', data);
    },
    getWorkOrderDetail: (id) => {
        return getAxios(`/orders/detail/${id}`);
    },
    // 分页查询 @author wuqian
    queryOrders: (data) => {
        return postAxios('/orders/page/query', data);
    },
    // 批量删除 @author wuqian
    batchDeleteOrders: (idList) => {
        return postAxios('/orders/deleteByIds', idList);
    },
    // 修改  @author wuqian
    updateOrders: (data) => {
        return postAxios('/orders/update',data);
    },
    // 导出全部  @author wuqian
    exportAll:(data)=>{
        return postDownloadAxios('/orders/export/all',data);
    },
    // 批量导出  @author wuqian
    batchExport: (idList) => {
        return postDownloadAxios('/orders/export/batch', idList);
    },
};
